package cn.edu.fzu.homemaking.api;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.edu.fzu.homemaking.web.Result;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;

@FeignClient(name = "wallet")
public interface WalletApi {

    @GetMapping("/api/wallet/getWallet")
    Result getWallet();


    @GetMapping("/api/wallet/getWater")
    Result getWater(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/api/wallet/getWaterDetail")
    Result getWaterDetail(@RequestParam("id") Long id);

    @GetMapping("/api/wallet/recharge")
    Result recharge(@RequestParam("money") BigDecimal money);

    @PostMapping("/api/wallet/transfer")
    Result transfer(@RequestParam("to") Long to, @RequestParam("money") BigDecimal money, @RequestParam("description") String description);
}
